//
//  MyCollectionViewCell.m
//  NovelRead
//
//  Created by xiaozao on 15/4/3.
//  Copyright (c) 2015年 Tony_Wang. All rights reserved.
//

#import "MyCollectionViewCell.h"

@implementation MyCollectionViewCell

- (void)dealloc
{
    [_logo release];
    [_title release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.title = [[UILabel alloc] init];
        self.logo = [[UIImageView alloc] init];

        self.title.textAlignment = NSTextAlignmentCenter;
        self.title.font = [UIFont systemFontOfSize:8];
        self.title.numberOfLines = 0;
        [self.title sizeToFit];

        
        
        [self.contentView addSubview:_title];
        [self.contentView addSubview:_logo];
        
        
        [_title release];
        [_logo release];

        //        self.myTestLabel = [[UILabel alloc] init];
        //        [self.contentView addSubview:self.myTestLabel];
        //        [_myTestLabel release];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    //    [super applyLayoutAttributes:layoutAttributes];
    
    self.logo.frame = CGRectMake(0, 0, 80, 110);
    
    self.title.frame = CGRectMake(0, 110, 80, 20);
    
    
    self.contentView.backgroundColor = [UIColor whiteColor];
    
}


@end
